﻿/*=================================================================
* 版权信息：Copyright (C) 2005-2011 捷点科技 All Rights Reserved.
* 文件名称：PointsUDRcordList.aspx.cs
* 创建标识：曾乃强 15158756652 2011-03-18 03:03:16
* 修改标识：
* 功能描述：
===================================================================*/
using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using CNVP.Framework;
using CNVP.JShop.UI;
using CNVP.Framework.Utils;
using CNVP.Framework.Helper;

namespace CNVP.JShop.Web.Admin
{
    public partial class PointsUDRcordList : AdminPage
    {
        BLL.CNVP_PointsUDRcord bll = new BLL.CNVP_PointsUDRcord();
        public int rplistCount = 0;
        public int UserID = 0;
        int PageIndex = 1;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!BLL.BLLCheckAdmin.LoginOk(Page, 89)) return;//判断页面权限
            if (!string.IsNullOrEmpty(Request.QueryString["UserID"]) && Public.IsNumber(Request.QueryString["UserID"]))
            {
                UserID = Convert.ToInt32(Request.QueryString["UserID"]);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["Page"]) && Public.IsNumber(Request.QueryString["Page"]))
            {
                PageIndex = Convert.ToInt32(Request.QueryString["Page"]);
            }
            if (!IsPostBack)
            {
                Model.CNVP_Users model_Users = new BLL.CNVP_Users().GetSingle_CNVP_UsersById(UserID);
                if (model_Users != null)
                {
                    lbUserName.Text = model_Users.UserName;
                }
                StartLoad(PageIndex);
            }
        }

        /// <summary>
        /// PageNavigator1_PageChange 的摘要说明
        /// 分页加载列表函数
        /// </summary>
        protected void StartLoad(int PageIndex)
        {
            int i, j;
            DataTable dt = null;
            int pageNum = 20;
            SQLConditionInfo[] st = new SQLConditionInfo[1];
            st[0] = new SQLConditionInfo("@UserID", UserID);
            dt = bll.GetPage(this.GetType().Name, PageIndex, pageNum, out i, out j, st);
            rpList.DataSource = dt;
            rpList.DataBind();
            paging.InnerHtml = Paginator.Pagination(PageIndex, i, j);
        }
    }
}